package com.bfly.mall.wechat.enums;

/**
 * 公众号消息类别
 *
 * @author 长沙商脉科技有限公司
 * @date 2021/1/16 19:01
 */
public enum WeChatMpMsgCategoryEnum {
    TEXT(1, "文本"),
    IMAGE(2, "图片"),
    VOICE(3, "语音"),
    VIDEO(4,"视频"),
    SHORT_VIDEO(5,"小视频"),
    LOCATION(6,"地理位置");
    private int id;
    private String type;

    WeChatMpMsgCategoryEnum(int id, String type) {
        this.id = id;
        this.type = type;
    }

    public static WeChatMpMsgCategoryEnum getType(int id) {
        for (WeChatMpMsgCategoryEnum status : WeChatMpMsgCategoryEnum.values()) {
            if (id == status.getId()) {
                return status;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
